﻿#ifndef ADDITEMDIALOG_H
#define ADDITEMDIALOG_H

#include <QDialog>
#include "passitem.h"
#include "dbtools.h"

namespace Ui {
class AddItemDialog;
}

class AddItemDialog : public QDialog
{
    Q_OBJECT

public:
    explicit AddItemDialog(Dbtools *dbtools,QString id,QWidget *parent = nullptr);
    ~AddItemDialog();


signals:
    void saveItem(PassItem *item);

private slots:
    void on_genPass_pushButton_clicked();

    void on_settingGen_pushButton_clicked();

    void on_cancel_pushButton_clicked();

private:
    Ui::AddItemDialog *ui;
    Dbtools *db;
    QStringList xxzmDit;
    QStringList dxzmDit;
    QStringList numDit;
    QStringList tsfhDit;
    QStringList allDit;

    void initTypes();
    void initDits();
    void initStyle();
    bool checkInput();
};

#endif // ADDITEMDIALOG_H
